import React, { Component } from 'react'
import { NavLink, Switch, Route, Redirect } from 'react-router-dom'
import News from './news'
import Message from './message'

export default class about extends Component {

    render() {
        return (
            <header className="App-header">
                About
                <div className="btn-group" role="group" >
                    <NavLink className="btn btn-default" to="/about/news">News</NavLink>
                    <NavLink className="btn btn-default" to="/about/msg">Message</NavLink>
                </div>
                <Switch>
                    <Route path="/about/news" component={News}></Route>
                    <Route path="/about/msg" component={Message}></Route>
                    <Redirect to="/about/news"/>
                </Switch>
            </header>
        )
    }
}
